<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>家属满意度调查列表</title>
	<#include "/common/resource.ftl">
</head>
<body>

<div class="ui-operation">
    <div class="ui-buttons">
        <div class="layui-btn-group tools">
            <@auth code='familySatisfactionQuestionnaire_add'><button class="layui-btn layui-btn-normal open-dialog" p="url:'${params.contextPath}/view/business/familySatisfactionQuestionnaire/familySatisfactionQuestionnaire_edit.htm',title:'添加家属满意度调查表',width:'80%',height:'100%'"><i class="fa fa-plus"></i>添加</button></@auth>
            <@auth code='familySatisfactionQuestionnaire_update'><button class="layui-btn layui-btn-normal singleSelected" p="url:'${params.contextPath}/view/business/familySatisfactionQuestionnaire/familySatisfactionQuestionnaire_edit.htm',title:'编辑家属满意度调查表',width:'80%',height:'100%'"><i class="fa fa-pencil"></i>修改</button></@auth>
            <@auth code='familySatisfactionQuestionnaire_delete'><button class="layui-btn layui-btn-normal remove-button" reurl="${params.contextPath}/web/familySatisfactionQuestionnaire/delete.json"><i class="fa fa-remove"></i>删除</button></@auth>
        </div>
    </div>
</div>
<div class="ui-content" style="padding-left: 10px;padding-right:10px;">
    <table id="datagrid" options="url:'${params.contextPath}/web/familySatisfactionQuestionnaire/list.json',params:'getSearchParams',dblClickRow:'showDetail'">
        <thead>
			<tr>
				<th data-options="field:'id',checkbox:true"></th>
				<th data-options="field:'roomNum',width:100,align:'left'">房间号</th>
				<th data-options="field:'satisfactoryJobSatisfactionStr',width:100,align:'left'">院部工作满意度</th>
				<th data-options="field:'satisfactoryJobStaffSatisfactionStr',width:100,align:'left'">院办工作人员服务热情满意度</th>
				<th data-options="field:'healthSatisfactionSatisfactionStr',width:100,align:'left'">院内总体环境、卫生满意度</th>
				<th data-options="field:'efficiencySatisfactionSatisfactionStr',width:100,align:'left'">院办工作责任、效率满意度</th>
				<th data-options="field:'doctorWorkAbilitySatisfactionStr',width:100,align:'left'">医生工作能力的满意度</th>
				<th data-options="field:'doctorServiceAttitudeSatisfactionStr',width:100,align:'left'">医生服务态度的满意度</th>
				<th data-options="field:'nurseWorkAbilitySatisfactionStr',width:100,align:'left'">护士工作能力的满意度</th>
				<th data-options="field:'nurseServiceAttitudeSatisfactionStr',width:100,align:'left'">护士服务态度的满意度</th>
				<th data-options="field:'nurseResolveAbilitySatisfactionStr',width:100,align:'left'">护士解决问题能力的满意度</th>
				<th data-options="field:'canteenMealSatisfactionStr',width:100,align:'left'">食堂饭菜满意度</th>
				<th data-options="field:'canteenWorkerServiceSatisfactionStr',width:100,align:'left'">食堂工作人员的服务态度满意度</th>
				<th data-options="field:'canteenHealthSatisfactionStr',width:100,align:'left'">食堂及餐厅卫生状况满意度</th>
				<th data-options="field:'safetySatisfactionStr',width:100,align:'left'">安全满意度</th>
				<th data-options="field:'doormanResponsibilitySatisfactionStr',width:100,align:'left'">门卫责任满意度</th>
				<th data-options="field:'securityJobSatisfactionStr',width:100,align:'left'">安保工作满意度</th>
				<th data-options="field:'marketingIntroducesSatisfactionStr',width:100,align:'left'">市场部介绍满意度</th>
				<th data-options="field:'marketingVisitSatisfactionStr',width:100,align:'left'">市场部参观满意度</th>
				<th data-options="field:'marketingServiceSatisfactionStr',width:100,align:'left'">市场部服务满意度</th>
				<th data-options="field:'mostSatisfactionPersonName',width:100,align:'left'">最满意的工作人员</th>
				<th data-options="field:'mostDissatisfiedPersonName',width:100,align:'left'">最不满意工作人员</th>
				<th data-options="field:'suggestion',width:100,align:'left'">建议</th>
			</tr>
        </thead>
    </table>
</div>
<script type="text/javascript">
    function getSearchParams() {
        return {name: $("input[name='name']").val()};
    }
    var showDetail = function (index, row) {
        <@auth code='familySatisfactionQuestionnaire_detail'>
            var url = "${params.contextPath}/view/business/familySatisfactionQuestionnaire/familySatisfactionQuestionnaire_detail.htm?id=" + row.id;
            DialogManager.openDialog("url:'" + url + "',title:'家属满意度调查表详情',width:'80%',height:'100%'");
        </@auth>
    };
    //formatter:formatState
    function formatState(val, row) {
    }

    $(function () {
        $(".remove-button").click(function () {
            var ids = DataGrid.getCheckedIds();
            if (ids == "") {
                layer.msg("请选择删除记录")
                return false;
            }
            var url = $(this).attr("reurl");
            layer.confirm('确定删除记录', function () {
                $.ajaxRequest({
                    type: 'post',
                    url: url,
                    data: {ids: ids.join(",")},
                    success: function (data) {
                        $.message(data.message);
                        if (data.success) {
                            DataGrid.reload();
                        }
                    }
                });
            });
        });
    });
</script>
</body>

</html>
